<?xml version="1.0" encoding="UTF-8"?>
<ui:composition
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
	xmlns:f="http://xmlns.jcp.org/jsf/core"
	xmlns:h="http://xmlns.jcp.org/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
	template="/WEB-INF/templates/public/default.xhtml"
>

	<f:metadata>
		<f:viewParam
			name="complaintId"
			value="#{complaintHome.id}"
		></f:viewParam>
		<f:event
			listener="#{complaintHome.initConversation()}"
			type="preRenderView"
		></f:event>
	</f:metadata>

	<ui:define name="head">
		<style type="text/css">
			.removeButton {
				float: right;
				margin-right: 20px;
			}
			
			td {				
				padding-bottom: 10px;
			}
			
			label {
				font-weight: bold;
			}
		</style>
		<h:outputStylesheet name="css/public/newuser-registration.css" />
		<h:outputStylesheet name="css/public/zhongjieminglu.css" />
		
	</ui:define>

	<ui:define name="content">

		<div class="sub_wrap">
			<div class="Methbox_tit">
				<h2>咨询投诉</h2>
				<span><p:link
					outcome="/index.xhtml"
					target="_blank"
				>平台首页</p:link> &gt;咨询投诉</span>
			</div>
			<h:form id="editForm">							
				<p:messages id="messages" />
				<h:panelGrid
					columns="2"
					cellpadding="0"
					border="0"
					cellspacing="0"
					styleClass="zxts_table"
				>
					<p:outputLabel
						for="title"
						value="标题"
					/>
					<p:inputText
						id="title"
						value="#{complaintHome.instance.title}"
						required="true"
						size="70"
					/>
					
					<p:outputLabel
						for="content"
						value="投诉内容"
					/>
					<p:inputTextarea
						id="content"
						value="#{complaintHome.instance.content}"
						required="true"
						rows="10"
						cols="80"
					>								
					</p:inputTextarea>
					
					<p:outputLabel
						for="contactInfo"
						value="联系方式"
					/>
					<p:inputText
						id="contactInfo"
						value="#{complaintHome.instance.contactInfo}"
						required="true"
						size="60"
					/>
				</h:panelGrid>					
				
				<div style="text-align: center; margin: 15px;">
					<p:commandButton
						action="#{complaintHome.saveAndFlush()}"
						value="提交"	
					/>
					<p:commandButton
						action="#{complaintHome.cancel()}"
						value="取消"
						immediate="true"
					></p:commandButton>
				</div>
			</h:form>			
		</div>
	</ui:define>

</ui:composition>
